import { ApiProperty } from '@nestjs/swagger';
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';

@Entity()
export class Dynamic {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  @ApiProperty({ description: '标题' })
  dynamicTitle: string;

  @Column()
  @ApiProperty({ description: '展示的发表日期' })
  dynamicTime: string;

  @Column({ nullable: true })
  @ApiProperty({ description: '详情' })
  dynamicDetail?: string;

  @Column()
  @ApiProperty({ description: '封面图' })
  dynamicCover: string;

  @Column({ nullable: true })
  @ApiProperty({ description: '链接' })
  dynamicLink?: string;
}
